package com.web.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author hgjxyz
 * @since 2020-11-18
 */
@TableName("token")
public class Token extends Model<Token> {

    private static final long serialVersionUID = 1L;

    /**
     * 当前登录用户id
     */
    @TableId
    private String id;
    /**
     * 用户类型0普通用户1管理员
     */
    @TableField("the_type")
    private Integer theType;
    /**
     * 全局唯一登录凭证
     */
    private String token;
    /**
     * 修改时间
     */
    private Date time;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getTheType() {
        return theType;
    }

    public void setTheType(Integer theType) {
        this.theType = theType;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Token{" +
        ", id=" + id +
        ", theType=" + theType +
        ", token=" + token +
        ", time=" + time +
        "}";
    }
}
